
<script src="web/assets/plugins/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="./fuentes/view/pokerAsignacion/js/script_ajax_poker_asignacion.js" type="text/javascript"></script>
<script src="web/assets/js/validadores_numericos.js" type="text/javascript"></script> 

<div class="clearfix"></div>
<div class="content">  
    <input type="hidden" name="torneoID"  id="torneoID" class="form-control" value="<?php if (!empty($torneo_id)) echo $torneo_id; ?>">
    
    <span  style="float: right;"><h3><?php if (!empty($pokerTorneo)) echo $pokerTorneo[0]['nombre']; ?></h3></span>
    <div class="page-title" style="width: 300px"> 
        <a href="javascript:void(0)" onclick="volver();" rel="ajax" class="active"><i class="icon-custom-left"></i><h3>Lista de Torneos</h3></a>
    </div> 

    <!-- Modal -->
    <div class="modal fade" id="myModalPokerAsignacionADD" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <br>
                    <i class="icon-credit-card icon-7x"></i>
                    <h4 id="myModalLabel" class="semi-bold">Asignación</h4>
                    <p class="no-margin"> </p>
                    <br>
                </div>

                <div class="modal-body">
                    <form  action="./fuentes/controller/PokerAsignacion.php" id="formPokerAsignacion" name="formPokerAsignacion" autocomplete="off" > 

                        <?php require_once '/FormPokerAsignacion.php'; ?>

                    </form>    
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>
        <!-- /.modal -->
    </div>

    <div class="row" id="movimiento">
        <div class="col-md-12">
            <div class="grid simple ">
                <div class="grid-title no-border">
                    <h4><span class="semi-bold">Poker Asignaciones</span></h4>
                    <button style="float: right;" class="btn btn-success btn-xs " onclick="setTorneoIdForm();" id="agregar" data-toggle="modal"  data-target="#myModalPokerAsignacionADD"> Agregar</button>
                    <div class="labelRight" id="error">	

                    </div>
                </div>
                <div class="grid-body no-border">

                    <table class="table table-hover no-more-tables table-condensed  " id="pokerAsignacionTABLE">
                        <thead>
                            <tr>
                                <th class="text-left" style="width:10%" >Tipo</th>
                                <th class="text-right" style="width:10%">Monto</th>
                                <th class="text-right" style="width:10%">Puntos</th>
                                <th class="text-center" style="width:10%">Promoción</th>
                                <th class="text-right" style="width:10%">Comisión % </th>
                                <th class="text-right" style="width:10%">Comisión Fija </th>
                                <th class="text-center" style="width:7%">Accion</th>
                            </tr>
                        </thead>
                        <tbody id="pokerAsignacionList">

                            <?php
                            if ($pokerAsignaciones) {
                                foreach ($pokerAsignaciones as $dato) {
                                    echo "<tr>
                                     <td>" . $dato["tipo"] . "</td>
                                       <td class='text-right' >" . $dato["monto"] . "</td>
                                       <td class='text-right' >" . $dato["puntos"] . "</td>
                                       <td class='text-center' >" . $dato["promo"] . "</td>    
                                       <td class='text-right' >" . $dato["comision_porcentual"] . "</td>
                                       <td class='text-right' >" . $dato["comision_fija"] . "</td>
                                       <td class='text-center' >
                                            <button class='btn btn-success btn-xs btn-mini' onclick='editDatos(" . $dato["id"] . ")' title='Editar' ><i class='fa fa-pencil'></i></button>&nbsp;&nbsp;
                                            <button class='btn btn-success btn-xs btn-mini' onclick='eliminarDato(" . $dato["id"] . ")' title='Eliminar' ><i class='fa fa-times'></i></button>
                                        </td>
                                    </tr>";
                                }
                            } else {
                                  echo "<tr><td colspan='7' class='text-center'><h4> No existen Registros </h4></td></tr>";
                            }
                            ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>




